package constant

import (
	"webGoDemo/model"
)

/**
kafka 的不同规格
*/

const (
	CmqKafkaSmall  = "cmq.kafka.small"
	CmqKafkaMiddle = "cmq.kafka.middle"
	CmqKafkaLarge  = "cmq.kafka.big"
	CmqKafkaHuge   = "cmq.kafka.huge"
)

func GetKafkaSpecific(ResourceClass string) model.InstanceInfo {

	switch ResourceClass {
	case CmqKafkaSmall:
		return model.InstanceInfo{
			Cpu:    2,
			Memory: "4096Mi",
			Store:  "ssd",
		}
	case CmqKafkaMiddle:
		return model.InstanceInfo{
			Cpu:    4,
			Memory: "8192Mi",
			Store:  "ssd",
		}
	case CmqKafkaLarge:
		return model.InstanceInfo{
			Cpu:    8,
			Memory: "16384Mi",
			Store:  "ssd",
		}
	case CmqKafkaHuge:
		return model.InstanceInfo{
			Cpu:    16,
			Memory: "32768Mi",
			Store:  "ssd",
		}
	}
	panic("不存在该实例信息")
}
